package jicheng;

public class pg  extends  Pet{
    private String sex;
    public String getSex() {
                 return sex;}
   public void setSex(String sex) {
                     if(sex.equals("1")) {
                             this.sex = "Q仔";
                          return;
                        }
                    this.sex = "Q妹";
            }

            public void print() {
                super.print();
                System.out.println("我的性别是："+getSex());
           }
 }

